Integrand size = 27, antiderivative size = 127 \[ \int \frac {(c+d \sin (e+f x))^2}{(3+3 \sin (e+f x))^{3/2}} \, dx=-\frac {(c-d) (c+7 d) \text {arctanh}\left (\frac {\sqrt {\frac {3}{2}} \cos (e+f x)}{\sqrt {3+3 \sin (e+f x)}}\right )}{6 \sqrt {6} f}+\frac {(c-5 d) d \cos (e+f x)}{6 f \sqrt {3+3 \sin (e+f x)}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (3+3 \sin (e+f x))^{3/2}} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.09, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2839, 2830, 2728, 212} \[ \int \frac {(c+d \sin (e+f x))^2}{(3+3 \sin (e+f x))^{3/2}} \, dx=-\frac {(c-d) (c+7 d) \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{2 \sqrt {2} a^{3/2} f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a \sin (e+f x)+a)^{3/2}}+\frac {d (c-5 d) \cos (e+f x)}{2 a f \sqrt {a \sin (e+f x)+a}} \]
[In]
[Out]
Rule 212
Rule 2728
Rule 2830
Rule 2839
Rubi steps \begin{align*} \text {integral}& = -\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}-\frac {\int \frac {-\frac {1}{2} a \left (c^2+5 c d-2 d^2\right )+\frac {1}{2} a (c-5 d) d \sin (e+f x)}{\sqrt {a+a \sin (e+f x)}} \, dx}{2 a^2} \\ & = \frac {(c-5 d) d \cos (e+f x)}{2 a f \sqrt {a+a \sin (e+f x)}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}+\frac {((c-d) (c+7 d)) \int \frac {1}{\sqrt {a+a \sin (e+f x)}} \, dx}{4 a} \\ & = \frac {(c-5 d) d \cos (e+f x)}{2 a f \sqrt {a+a \sin (e+f x)}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}-\frac {((c-d) (c+7 d)) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{2 a f} \\ & = -\frac {(c-d) (c+7 d) \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{2 \sqrt {2} a^{3/2} f}+\frac {(c-5 d) d \cos (e+f x)}{2 a f \sqrt {a+a \sin (e+f x)}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 1.25 (sec) , antiderivative size = 242, normalized size of antiderivative = 1.91 \[ \int \frac {(c+d \sin (e+f x))^2}{(3+3 \sin (e+f x))^{3/2}} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (2 (c-d)^2 \sin \left (\frac {1}{2} (e+f x)\right )-(c-d)^2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+(1+i) (-1)^{3/4} \left (c^2+6 c d-7 d^2\right ) \text {arctanh}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (-1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2-4 d^2 \cos \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+4 d^2 \sin \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2\right )}{6 \sqrt {3} f (1+\sin (e+f x))^{3/2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(315\) vs. \(2(119)=238\).
Time = 2.70 (sec) , antiderivative size = 316, normalized size of antiderivative = 2.49
method | result | size |
default | \(-\frac {\left (\sin \left (f x +e \right ) \left (\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \,c^{2}+6 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a c d -7 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \,d^{2}+8 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, d^{2}\right )+\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \,c^{2}+6 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a c d -7 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \,d^{2}+2 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, c^{2}-4 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, c d +10 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, d^{2}\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}}{4 a^{\frac {5}{2}} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(316\) |
parts | \(-\frac {c^{2} \left (\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{2} \sin \left (f x +e \right )+2 \sqrt {a -a \sin \left (f x +e \right )}\, a^{\frac {3}{2}}+\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{2}\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}}{4 a^{\frac {7}{2}} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}+\frac {d^{2} \left (7 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \sin \left (f x +e \right )+7 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a -8 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, \sin \left (f x +e \right )-10 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}}{4 a^{\frac {5}{2}} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}+\frac {c d \left (-3 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \sin \left (f x +e \right )-3 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a +2 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}}{2 a^{\frac {5}{2}} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(402\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 380 vs. \(2 (119) = 238\).
Time = 0.32 (sec) , antiderivative size = 380, normalized size of antiderivative = 2.99 \[ \int \frac {(c+d \sin (e+f x))^2}{(3+3 \sin (e+f x))^{3/2}} \, dx=-\frac {\sqrt {2} {\left ({\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, c^{2} - 12 \, c d + 14 \, d^{2} - {\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right ) - {\left (2 \, c^{2} + 12 \, c d - 14 \, d^{2} + {\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )} + 3 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \, {\left (4 \, d^{2} \cos \left (f x + e\right )^{2} + c^{2} - 2 \, c d + d^{2} + {\left (c^{2} - 2 \, c d + 5 \, d^{2}\right )} \cos \left (f x + e\right ) + {\left (4 \, d^{2} \cos \left (f x + e\right ) - c^{2} + 2 \, c d - d^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{8 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f - {\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \]
[In]
[Out]
\[ \int \frac {(c+d \sin (e+f x))^2}{(3+3 \sin (e+f x))^{3/2}} \, dx=\int \frac {\left (c + d \sin {\left (e + f x \right )}\right )^{2}}{\left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]
[In]
[Out]
\[ \int \frac {(c+d \sin (e+f x))^2}{(3+3 \sin (e+f x))^{3/2}} \, dx=\int { \frac {{\left (d \sin \left (f x + e\right ) + c\right )}^{2}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 266 vs. \(2 (119) = 238\).
Time = 0.35 (sec) , antiderivative size = 266, normalized size of antiderivative = 2.09 \[ \int \frac {(c+d \sin (e+f x))^2}{(3+3 \sin (e+f x))^{3/2}} \, dx=\frac {\frac {16 \, \sqrt {2} d^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{\frac {3}{2}} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {\sqrt {2} {\left (\sqrt {a} c^{2} + 6 \, \sqrt {a} c d - 7 \, \sqrt {a} d^{2}\right )} \log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {\sqrt {2} {\left (\sqrt {a} c^{2} + 6 \, \sqrt {a} c d - 7 \, \sqrt {a} d^{2}\right )} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {2 \, \sqrt {2} {\left (\sqrt {a} c^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2 \, \sqrt {a} c d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + \sqrt {a} d^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{8 \, f} \]
[In]
[Out]
Timed out. \[ \int \frac {(c+d \sin (e+f x))^2}{(3+3 \sin (e+f x))^{3/2}} \, dx=\int \frac {{\left (c+d\,\sin \left (e+f\,x\right )\right )}^2}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \]
[In]
[Out]